<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>建议使用信管帮APP</title>
    <!-- 设计稿iPhone XR 414 html基础font-size=41.1px -->
    <!-- 该页面跳转缓慢，取消base64图片素材方法，采用webp图片素材格式 -->
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100%;
        }
        ul li{
            list-style: none;
        }
        a{
            text-decoration: none;
            
        }
        a:link{
            color: #404040;
        }
        a:visited{
            color: #404040;
        }
        a:hover{
            color: #404040;
        }
        a:active{
            color: #404040;
        }
        ::-webkit-scrollbar{
            /* width: 0; 移动端取消滚动条无效*/
            display: none;
        }
        body{
            
            background: linear-gradient(to bottom, #2493f1 20%, #f6f6f6 30%);/*#2493f1*/
            display: flex;
            flex-direction: column;
            font-family: 微软雅黑;
            font-size: .4348rem;
            letter-spacing: .0169rem;
            position: relative;
            overflow: hidden;/*禁止上下滑动*/
            -webkit-user-select:none;
            -moz-user-select:none;
            -ms-user-select:none;
            user-select:none;
        }
        header{
            background-color: #00000000 !important;
            color: #fff;
        }
        header .left{
            background-image: url(../../../images/header/leftwhite.webp) !important;
        }
        section{/*
            border: 1px solid rgb(0, 255, 21);*/
            flex: 1;/*
            background-color: #f6f6f6cb;*/
            display: flex;
            flex-direction: column;
            padding: 0 .4831rem;
        }
        section .title{
            font-size: .6039rem;
            font-weight: 550;
            margin: .4831rem 0 .2415rem 0;
            color: #fff;
        }
        .container{/*
            border: 1px solid rgba(255, 0, 0, 0.821);*/
            border-radius: .1691rem;
            background: #ffffff;
            box-sizing: border-box;
            padding: .2899rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: self-start;
            color: #000;
            box-shadow: .1208rem .1208rem .1208rem rgba(59, 59, 59, 0.049);
        }
        .container .left{/*
            border: 1px solid rgba(255, 0, 0, 0.821);*/
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: flex-start;
            width: 100%;
            min-height: 2.0773rem;

        }
        .left>span{/*
            border: 1px solid rgba(136, 255, 0, 0.821);*/
            
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
        }
        .left .yzxl{
            font-size: .4831rem;
            font-weight: 550;
        }
        .left .mailIcom{/*
            border: 1px solid rgba(136, 255, 0, 0.821);*/
            border-radius: .2415rem;
            width: 1.6908rem;
            height: 1.6908rem;
            margin-right: .2415rem;
            background: url(../../../images/person/person_senter/mailIcon.webp) no-repeat;
            background-size: contain;
        }
        .left .mail{
            font-size: .4831rem;
            font-weight: 500;
            color: #000;
            
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .left .txt{
            /*
            border: 1px solid rgba(136, 255, 0, 0.821);*/
            color: #5c5c5c;
            margin-top: .1208rem;
        }
        
        .container .right{
            /*
            border: 1px solid rgba(136, 255, 0, 0.821);*/
            width: 100%;
            height: 1.087rem;
            margin-top: .2415rem;
            
        }
        button{
            width: 100%;
            height: 100%;
            border: .0483rem solid #ffffff;
            background: #2493f1;
            border-radius: .0725rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: .3623rem;
            color: #ffffff;

        }
        .right .name{/*
            border: 1px solid rgba(136, 255, 0, 0.821);*/
            max-width: 2.4155rem;
            text-align: left;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #ffffff;
        }



        .container .right{
            /*
            border: 1px solid rgba(255, 0, 0, 0.821);*/
        }
        
        
        section span.txt{
            color: #ffffff;
            font-size: .3623rem;
            margin-bottom: .4831rem;
        }
        

        .schoolicon{
            position: absolute;
            z-index: -100;
            top: 0;
            right: 0;
            width: 70%;
            opacity: 0.5;

        }
    </style>
    <link rel="stylesheet" href="../../../css/header.css">
    <script src="../../../lib/jquery.min.js"></script>
    <script src="../../../lib/axios.js"></script>
    <script src="../../../lib/vue.js"></script>
    <script>
        document.addEventListener('visibilitychange',
        function(){
            if(document.visibilityState === "visible"){
                setTimeout(()=>{
                    location.reload()
                }, 1000)
            }
        }
        )
    </script>
</head>
<body>
    <img class="schoolicon" src="../../../images/smrz/school.webp" alt="">
    <header>
        <div class="backBtn"></div>
        <div class="left"></div>
        <span class="title">邮箱验证</span>
    </header>
    <script>
        document.querySelector(".backBtn").onclick=function(){
            window.history.go(-1)
        }
    </script>
    <section>
        <span class="title">邮箱验证</span>
        <span class="txt">邮箱可以用于验证确实是您本人在登录，也可在您的账号有异常行为时来验证您的身份，以确保您的账号安全。</span>
        <div class="container">
            <div class="left">
                <div class="mailIcom"></div>
                <span>
                    <span class="mail" >{{mail}}</span>
                    <span class="txt">您可以通过绑定的邮箱来保护您的账号安全</span>
                </span>
                
            </div>
            <div class="right">
                <button @click="toyx(0)">去绑定</button>
            </div>
        </div>
        
        
        
        

    </section>
    

    

    
    
    

    <script>
        new Vue({
            el: "section",
            data: {
                mail: "",
                isBtnShow: false
            },
            methods: {
                toyx(a){
                    window.location.href=`./yxyz.html?code=${a}` 
                }
            },
            mounted() {
                let userInfo = localStorage.getItem('XGB-user')
                let id = JSON.parse(userInfo).id

                fetch(`https://fc-mp-e8e2bde5-0c0c-4622-87b5-66f8b08c3856.next.bspapp.com/edit_information/getMyPhone?id=${id}`)
                .then(res=>res.json())
                .then(res=>{
                    this.mail = res.mail
                    /**/
                    if(res.mail !== '尚未绑定邮箱'){
                        $('button').text('更换邮箱')
                    }
                })
                /*
                if(JSON.parse(userInfo).realInfo === undefined){
                    console.log("realInfo is undefined ")
                }else{
                    this.isBtnShow = false
                    this.school = JSON.parse(userInfo).realInfo.School
                    this.xueyuan = JSON.parse(userInfo).realInfo.Xueyuan
                    this.number = JSON.parse(userInfo).realInfo.Number
                    this.name = JSON.parse(userInfo).realInfo.Name
                    this.gender = JSON.parse(userInfo).realInfo.Gender
                    this.classes = JSON.parse(userInfo).realInfo.Classes
                }*/
                
            }
        })
        

    </script>
    
    <script>
        //根据设备宽度计算html的font-size
        function resetHtmlFont(){
            //获取html对象并动态设置font-size = 设备宽度的1/10
            document.documentElement.style.fontSize = screen.width/10 + 'px';
        }
        //执行一下
        resetHtmlFont();
        //如果窗口大小改变了，则重新计算基础font-size
        window.onresize = resetHtmlFont;
    </script>
</body>
</html>